3.149 \(\int \frac{\sec ^4(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx\)

Optimal. Leaf size=232 \[ \frac{\left (10 a^2+3 b^2\right ) \tan (c+d x)}{b^6 d}+\frac{\left (a^2+b^2\right )^3}{3 a^3 b^4 d (a \cot (c+d x)+b)^3}+\frac{9 a^4 b^2+10 a^6+b^6}{a^3 b^6 d (a \cot (c+d x)+b)}+\frac{3 a^4 b^2+2 a^6-b^6}{a^3 b^5 d (a \cot (c+d x)+b)^2}-\frac{4 a \left (5 a^2+3 b^2\right ) \log (\tan (c+d x))}{b^7 d}-\frac{4 a \left (5 a^2+3 b^2\right ) \log (a \cot (c+d x)+b)}{b^7 d}-\frac{2 a \tan ^2(c+d x)}{b^5 d}+\frac{\tan ^3(c+d x)}{3 b^4 d} \]

[Out]

(a^2 + b^2)^3/(3*a^3*b^4*d*(b + a*Cot[c + d*x])^3) + (2*a^6 + 3*a^4*b^2 - b^6)/(a^3*b^5*d*(b + a*Cot[c + d*x])
^2) + (10*a^6 + 9*a^4*b^2 + b^6)/(a^3*b^6*d*(b + a*Cot[c + d*x])) - (4*a*(5*a^2 + 3*b^2)*Log[b + a*Cot[c + d*x
]])/(b^7*d) - (4*a*(5*a^2 + 3*b^2)*Log[Tan[c + d*x]])/(b^7*d) + ((10*a^2 + 3*b^2)*Tan[c + d*x])/(b^6*d) - (2*a
*Tan[c + d*x]^2)/(b^5*d) + Tan[c + d*x]^3/(3*b^4*d)

________________________________________________________________________________________

Rubi [A]  time = 0.248932, antiderivative size = 232, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.071, Rules used = {3088, 894} \[ \frac{\left (10 a^2+3 b^2\right ) \tan (c+d x)}{b^6 d}+\frac{\left (a^2+b^2\right )^3}{3 a^3 b^4 d (a \cot (c+d x)+b)^3}+\frac{9 a^4 b^2+10 a^6+b^6}{a^3 b^6 d (a \cot (c+d x)+b)}+\frac{3 a^4 b^2+2 a^6-b^6}{a^3 b^5 d (a \cot (c+d x)+b)^2}-\frac{4 a \left (5 a^2+3 b^2\right ) \log (\tan (c+d x))}{b^7 d}-\frac{4 a \left (5 a^2+3 b^2\right ) \log (a \cot (c+d x)+b)}{b^7 d}-\frac{2 a \tan ^2(c+d x)}{b^5 d}+\frac{\tan ^3(c+d x)}{3 b^4 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^4/(a*Cos[c + d*x] + b*Sin[c + d*x])^4,x]

[Out]

(a^2 + b^2)^3/(3*a^3*b^4*d*(b + a*Cot[c + d*x])^3) + (2*a^6 + 3*a^4*b^2 - b^6)/(a^3*b^5*d*(b + a*Cot[c + d*x])
^2) + (10*a^6 + 9*a^4*b^2 + b^6)/(a^3*b^6*d*(b + a*Cot[c + d*x])) - (4*a*(5*a^2 + 3*b^2)*Log[b + a*Cot[c + d*x
]])/(b^7*d) - (4*a*(5*a^2 + 3*b^2)*Log[Tan[c + d*x]])/(b^7*d) + ((10*a^2 + 3*b^2)*Tan[c + d*x])/(b^6*d) - (2*a
*Tan[c + d*x]^2)/(b^5*d) + Tan[c + d*x]^3/(3*b^4*d)

Rule 3088

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> -Dist[d^(-1), Subst[Int[(x^m*(b + a*x)^n)/(1 + x^2)^((m + n + 2)/2), x], x, Cot[c + d*x]], x] /; FreeQ[
{a, b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] &&  !(GtQ[n, 0] && GtQ[m, 1])

Rule 894

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rubi steps

\begin{align*} \int \frac{\sec ^4(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^3}{x^4 (b+a x)^4} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{1}{b^4 x^4}-\frac{4 a}{b^5 x^3}+\frac{10 a^2+3 b^2}{b^6 x^2}-\frac{4 \left (5 a^3+3 a b^2\right )}{b^7 x}+\frac{\left (a^2+b^2\right )^3}{a^2 b^4 (b+a x)^4}+\frac{2 \left (2 a^6+3 a^4 b^2-b^6\right )}{a^2 b^5 (b+a x)^3}+\frac{10 a^6+9 a^4 b^2+b^6}{a^2 b^6 (b+a x)^2}+\frac{4 \left (5 a^4+3 a^2 b^2\right )}{b^7 (b+a x)}\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac{\left (a^2+b^2\right )^3}{3 a^3 b^4 d (b+a \cot (c+d x))^3}+\frac{2 a^6+3 a^4 b^2-b^6}{a^3 b^5 d (b+a \cot (c+d x))^2}+\frac{10 a^6+9 a^4 b^2+b^6}{a^3 b^6 d (b+a \cot (c+d x))}-\frac{4 a \left (5 a^2+3 b^2\right ) \log (b+a \cot (c+d x))}{b^7 d}-\frac{4 a \left (5 a^2+3 b^2\right ) \log (\tan (c+d x))}{b^7 d}+\frac{\left (10 a^2+3 b^2\right ) \tan (c+d x)}{b^6 d}-\frac{2 a \tan ^2(c+d x)}{b^5 d}+\frac{\tan ^3(c+d x)}{3 b^4 d}\\ \end{align*}

Mathematica [A]  time = 2.0133, size = 295, normalized size = 1.27 \[ \frac{-2 \left (-6 a^2 b^4 \tan ^4(c+d x)+6 a b^3 \tan ^3(c+d x) \left (\left (5 a^2+3 b^2\right ) \log (a+b \tan (c+d x))-3 a^2\right )+6 b^2 \tan ^2(c+d x) \left (3 a^2 \left (5 a^2+3 b^2\right ) \log (a+b \tan (c+d x))+11 a^2 b^2+6 a^4+2 b^4\right )+6 a^4 \left (5 a^2+3 b^2\right ) \log (a+b \tan (c+d x))+3 a b \tan (c+d x) \left (6 a^2 \left (5 a^2+3 b^2\right ) \log (a+b \tan (c+d x))+30 a^2 b^2+27 a^4+b^4\right )+36 a^4 b^2+3 a^2 b^4+37 a^6+4 b^6\right )+3 b^4 \sec ^4(c+d x) \left (a^2-a b \tan (c+d x)+2 b^2\right )+b^6 \sec ^6(c+d x)}{3 b^7 d (a+b \tan (c+d x))^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^4/(a*Cos[c + d*x] + b*Sin[c + d*x])^4,x]

[Out]

(b^6*Sec[c + d*x]^6 + 3*b^4*Sec[c + d*x]^4*(a^2 + 2*b^2 - a*b*Tan[c + d*x]) - 2*(37*a^6 + 36*a^4*b^2 + 3*a^2*b
^4 + 4*b^6 + 6*a^4*(5*a^2 + 3*b^2)*Log[a + b*Tan[c + d*x]] + 3*a*b*(27*a^4 + 30*a^2*b^2 + b^4 + 6*a^2*(5*a^2 +
 3*b^2)*Log[a + b*Tan[c + d*x]])*Tan[c + d*x] + 6*b^2*(6*a^4 + 11*a^2*b^2 + 2*b^4 + 3*a^2*(5*a^2 + 3*b^2)*Log[
a + b*Tan[c + d*x]])*Tan[c + d*x]^2 + 6*a*b^3*(-3*a^2 + (5*a^2 + 3*b^2)*Log[a + b*Tan[c + d*x]])*Tan[c + d*x]^
3 - 6*a^2*b^4*Tan[c + d*x]^4))/(3*b^7*d*(a + b*Tan[c + d*x])^3)

________________________________________________________________________________________

Maple [A]  time = 0.306, size = 330, normalized size = 1.4 \begin{align*}{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3\,{b}^{4}d}}-2\,{\frac{a \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{{b}^{5}d}}+10\,{\frac{{a}^{2}\tan \left ( dx+c \right ) }{d{b}^{6}}}+3\,{\frac{\tan \left ( dx+c \right ) }{{b}^{4}d}}-20\,{\frac{{a}^{3}\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d{b}^{7}}}-12\,{\frac{a\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{{b}^{5}d}}+3\,{\frac{{a}^{5}}{d{b}^{7} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}+6\,{\frac{{a}^{3}}{{b}^{5}d \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}+3\,{\frac{a}{d{b}^{3} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}-15\,{\frac{{a}^{4}}{d{b}^{7} \left ( a+b\tan \left ( dx+c \right ) \right ) }}-18\,{\frac{{a}^{2}}{{b}^{5}d \left ( a+b\tan \left ( dx+c \right ) \right ) }}-3\,{\frac{1}{d{b}^{3} \left ( a+b\tan \left ( dx+c \right ) \right ) }}-{\frac{{a}^{6}}{3\,d{b}^{7} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{{a}^{4}}{{b}^{5}d \left ( a+b\tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{{a}^{2}}{d{b}^{3} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{1}{3\,db \left ( a+b\tan \left ( dx+c \right ) \right ) ^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4/(a*cos(d*x+c)+b*sin(d*x+c))^4,x)

[Out]

1/3*tan(d*x+c)^3/b^4/d-2*a*tan(d*x+c)^2/b^5/d+10/d/b^6*a^2*tan(d*x+c)+3*tan(d*x+c)/b^4/d-20/d*a^3/b^7*ln(a+b*t
an(d*x+c))-12/d*a/b^5*ln(a+b*tan(d*x+c))+3/d*a^5/b^7/(a+b*tan(d*x+c))^2+6/d*a^3/b^5/(a+b*tan(d*x+c))^2+3/d*a/b
^3/(a+b*tan(d*x+c))^2-15/d/b^7/(a+b*tan(d*x+c))*a^4-18/d/b^5/(a+b*tan(d*x+c))*a^2-3/d/b^3/(a+b*tan(d*x+c))-1/3
/d/b^7/(a+b*tan(d*x+c))^3*a^6-1/d/b^5/(a+b*tan(d*x+c))^3*a^4-1/d/b^3/(a+b*tan(d*x+c))^3*a^2-1/3/d/b/(a+b*tan(d
*x+c))^3

________________________________________________________________________________________

Maxima [A]  time = 1.19471, size = 293, normalized size = 1.26 \begin{align*} -\frac{\frac{37 \, a^{6} + 39 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6} + 9 \,{\left (5 \, a^{4} b^{2} + 6 \, a^{2} b^{4} + b^{6}\right )} \tan \left (d x + c\right )^{2} + 9 \,{\left (9 \, a^{5} b + 10 \, a^{3} b^{3} + a b^{5}\right )} \tan \left (d x + c\right )}{b^{10} \tan \left (d x + c\right )^{3} + 3 \, a b^{9} \tan \left (d x + c\right )^{2} + 3 \, a^{2} b^{8} \tan \left (d x + c\right ) + a^{3} b^{7}} - \frac{b^{2} \tan \left (d x + c\right )^{3} - 6 \, a b \tan \left (d x + c\right )^{2} + 3 \,{\left (10 \, a^{2} + 3 \, b^{2}\right )} \tan \left (d x + c\right )}{b^{6}} + \frac{12 \,{\left (5 \, a^{3} + 3 \, a b^{2}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{7}}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a*cos(d*x+c)+b*sin(d*x+c))^4,x, algorithm="maxima")

[Out]

-1/3*((37*a^6 + 39*a^4*b^2 + 3*a^2*b^4 + b^6 + 9*(5*a^4*b^2 + 6*a^2*b^4 + b^6)*tan(d*x + c)^2 + 9*(9*a^5*b + 1
0*a^3*b^3 + a*b^5)*tan(d*x + c))/(b^10*tan(d*x + c)^3 + 3*a*b^9*tan(d*x + c)^2 + 3*a^2*b^8*tan(d*x + c) + a^3*
b^7) - (b^2*tan(d*x + c)^3 - 6*a*b*tan(d*x + c)^2 + 3*(10*a^2 + 3*b^2)*tan(d*x + c))/b^6 + 12*(5*a^3 + 3*a*b^2
)*log(b*tan(d*x + c) + a)/b^7)/d

________________________________________________________________________________________

Fricas [B]  time = 0.703292, size = 1251, normalized size = 5.39 \begin{align*} -\frac{4 \,{\left (45 \, a^{4} b^{2} - 3 \, a^{2} b^{4} - 4 \, b^{6}\right )} \cos \left (d x + c\right )^{6} - b^{6} - 6 \,{\left (25 \, a^{4} b^{2} - 5 \, a^{2} b^{4} - 4 \, b^{6}\right )} \cos \left (d x + c\right )^{4} - 3 \,{\left (5 \, a^{2} b^{4} + 2 \, b^{6}\right )} \cos \left (d x + c\right )^{2} + 6 \,{\left ({\left (5 \, a^{6} - 12 \, a^{4} b^{2} - 9 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{6} + 3 \,{\left (5 \, a^{4} b^{2} + 3 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{4} +{\left ({\left (15 \, a^{5} b + 4 \, a^{3} b^{3} - 3 \, a b^{5}\right )} \cos \left (d x + c\right )^{5} +{\left (5 \, a^{3} b^{3} + 3 \, a b^{5}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \,{\left ({\left (5 \, a^{6} - 12 \, a^{4} b^{2} - 9 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{6} + 3 \,{\left (5 \, a^{4} b^{2} + 3 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{4} +{\left ({\left (15 \, a^{5} b + 4 \, a^{3} b^{3} - 3 \, a b^{5}\right )} \cos \left (d x + c\right )^{5} +{\left (5 \, a^{3} b^{3} + 3 \, a b^{5}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) +{\left (3 \, a b^{5} \cos \left (d x + c\right ) - 4 \,{\left (15 \, a^{5} b - 41 \, a^{3} b^{3} - 12 \, a b^{5}\right )} \cos \left (d x + c\right )^{5} - 2 \,{\left (55 \, a^{3} b^{3} + 21 \, a b^{5}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{3 \,{\left (3 \, a b^{9} d \cos \left (d x + c\right )^{4} +{\left (a^{3} b^{7} - 3 \, a b^{9}\right )} d \cos \left (d x + c\right )^{6} +{\left (b^{10} d \cos \left (d x + c\right )^{3} +{\left (3 \, a^{2} b^{8} - b^{10}\right )} d \cos \left (d x + c\right )^{5}\right )} \sin \left (d x + c\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a*cos(d*x+c)+b*sin(d*x+c))^4,x, algorithm="fricas")

[Out]

-1/3*(4*(45*a^4*b^2 - 3*a^2*b^4 - 4*b^6)*cos(d*x + c)^6 - b^6 - 6*(25*a^4*b^2 - 5*a^2*b^4 - 4*b^6)*cos(d*x + c
)^4 - 3*(5*a^2*b^4 + 2*b^6)*cos(d*x + c)^2 + 6*((5*a^6 - 12*a^4*b^2 - 9*a^2*b^4)*cos(d*x + c)^6 + 3*(5*a^4*b^2
 + 3*a^2*b^4)*cos(d*x + c)^4 + ((15*a^5*b + 4*a^3*b^3 - 3*a*b^5)*cos(d*x + c)^5 + (5*a^3*b^3 + 3*a*b^5)*cos(d*
x + c)^3)*sin(d*x + c))*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2) - 6*((5*a^6 -
12*a^4*b^2 - 9*a^2*b^4)*cos(d*x + c)^6 + 3*(5*a^4*b^2 + 3*a^2*b^4)*cos(d*x + c)^4 + ((15*a^5*b + 4*a^3*b^3 - 3
*a*b^5)*cos(d*x + c)^5 + (5*a^3*b^3 + 3*a*b^5)*cos(d*x + c)^3)*sin(d*x + c))*log(cos(d*x + c)^2) + (3*a*b^5*co
s(d*x + c) - 4*(15*a^5*b - 41*a^3*b^3 - 12*a*b^5)*cos(d*x + c)^5 - 2*(55*a^3*b^3 + 21*a*b^5)*cos(d*x + c)^3)*s
in(d*x + c))/(3*a*b^9*d*cos(d*x + c)^4 + (a^3*b^7 - 3*a*b^9)*d*cos(d*x + c)^6 + (b^10*d*cos(d*x + c)^3 + (3*a^
2*b^8 - b^10)*d*cos(d*x + c)^5)*sin(d*x + c))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4/(a*cos(d*x+c)+b*sin(d*x+c))**4,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.13594, size = 336, normalized size = 1.45 \begin{align*} -\frac{\frac{12 \,{\left (5 \, a^{3} + 3 \, a b^{2}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{7}} - \frac{110 \, a^{3} b^{3} \tan \left (d x + c\right )^{3} + 66 \, a b^{5} \tan \left (d x + c\right )^{3} + 285 \, a^{4} b^{2} \tan \left (d x + c\right )^{2} + 144 \, a^{2} b^{4} \tan \left (d x + c\right )^{2} - 9 \, b^{6} \tan \left (d x + c\right )^{2} + 249 \, a^{5} b \tan \left (d x + c\right ) + 108 \, a^{3} b^{3} \tan \left (d x + c\right ) - 9 \, a b^{5} \tan \left (d x + c\right ) + 73 \, a^{6} + 27 \, a^{4} b^{2} - 3 \, a^{2} b^{4} - b^{6}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{3} b^{7}} - \frac{b^{8} \tan \left (d x + c\right )^{3} - 6 \, a b^{7} \tan \left (d x + c\right )^{2} + 30 \, a^{2} b^{6} \tan \left (d x + c\right ) + 9 \, b^{8} \tan \left (d x + c\right )}{b^{12}}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a*cos(d*x+c)+b*sin(d*x+c))^4,x, algorithm="giac")

[Out]

-1/3*(12*(5*a^3 + 3*a*b^2)*log(abs(b*tan(d*x + c) + a))/b^7 - (110*a^3*b^3*tan(d*x + c)^3 + 66*a*b^5*tan(d*x +
 c)^3 + 285*a^4*b^2*tan(d*x + c)^2 + 144*a^2*b^4*tan(d*x + c)^2 - 9*b^6*tan(d*x + c)^2 + 249*a^5*b*tan(d*x + c
) + 108*a^3*b^3*tan(d*x + c) - 9*a*b^5*tan(d*x + c) + 73*a^6 + 27*a^4*b^2 - 3*a^2*b^4 - b^6)/((b*tan(d*x + c)
+ a)^3*b^7) - (b^8*tan(d*x + c)^3 - 6*a*b^7*tan(d*x + c)^2 + 30*a^2*b^6*tan(d*x + c) + 9*b^8*tan(d*x + c))/b^1
2)/d